package com.antler.smt.portal.mapper;

import com.antler.smt.entity.RequirementEntity;
import com.antler.smt.request.portal.RequirementFileIdReq;
import com.antler.smt.response.base.Result;
import com.antler.smt.response.portal.GetRequirementListResp;
import com.antler.smt.response.portal.GetSmsInfoResp;
import com.antler.smt.response.portal.RequirementFileDownloadResp;
import org.apache.el.lang.ELArithmetic;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * 发布需求Mapper
 *
 * @author zhanghyi
 * @date 2018-03-28 14:45
 */
@Repository
public interface RequirementInfoMapper {

    /**
     *  获取其采购商发布需求的id列表
     *
     * @param id
     * @return
     */
    List<Long> selectRequirementByPurchaserId(Long id);

    /**
     *  获取当前插入的id值
     *
     * @return
     */
    Long selectLastId();

    /**
     *  获取文件名列表
     *
     * @param requirementFileIdReq
     * @return
     */
    String getFileName(RequirementFileIdReq requirementFileIdReq);

    /**
     * 获取此订单下的发布需求详细信息
     *
     * @param orderId
     * @return
     */
    GetRequirementListResp getRequirementByOrderId(Long orderId);

    /**
     * 用于判断重复
     *
     * @return
     */
    Date getLastTimeDate(Long purchaserId);

    GetSmsInfoResp getSmsContent(Long requirementId);
}